<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection"/>
    <title>贷款超市</title>
    <link rel="stylesheet" href="css/H-ui.reset.css">
    <link rel="stylesheet" href="css/tongyong.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/alert.css">
    <style>
        .multiple_sort ul li{
            padding-right: 66%;
        }
        .type_sort ul li{
            padding-left: 66%;
        }
        /*.sort_model_bg{*/
            /*width: 100%;*/
            /*height: 100%;*/
        /*}*/

    </style>
</head>
<body>
<header class="list_header">
	
    <section class="header_term">
        <div class="term_list term_list_multiple">
            <img src="images/list_04.png" alt="">
            <p>综合排序</p>
        </div>
        <div class="term_list term_list_sum">
            <img src="images/list_05.png" alt="">
            <p>金额不限</p>
        </div>
        <div class="term_list term_list_type">
            <img src="images/list_02.png" alt="">
            <p>贷款类型</p>
        </div>
    </section>
</header>
<div>
    <!--综合排序-->
    <div class="sort_model multiple_sort" value="1">
        <div class="sort_model_cnt">
            <ul>

            </ul>
        </div>
        <div class="sort_model_bg"></div>
    </div>
    <!--金额排序-->
    <div class="sort_model sum_sort" value="2">
        <div class="sort_model_cnt">
            <ul>
                <li class="sort_active" minLimit="" maxLimit="">金额不限</li>
                <li minLimit="" maxLimit="2000">2千以下</li>
                <li minLimit="2000" maxLimit="5000">2千-5千</li>
                <li minLimit="5000" maxLimit="20000">5千-2万</li>
                <li minLimit="20000" maxLimit="">2万以上</li>
            </ul>
        </div>
        <div class="sort_model_bg"></div>
    </div>
    <!--类型排序-->
    <div class="sort_model type_sort" value="3">
        <div class="sort_model_cnt">
            <ul>

            </ul>
        </div>
        <div class="sort_model_bg"></div>
    </div>

</div>
<section class="list_section"></section>

<section class="list_footer">
    <section class="footer_term">
        <div class="footer_term_list footer_term_list_multiple">
        	<a onclick="toIndexPage()">
            	<img src="images/bottom_05.png" alt="">
            	<p>首页</p>
            </a>
        </div>
        <div class="footer_term_list footer_term_list_sum">
        	<a href="#">
            	<img src="images/bottom_01.png" alt="">
            	<p>贷款超市</p>
        	</a>
        </div>
        <div class="footer_term_list footer_term_list_type">
            <a href="personal.html">
            	<img src="images/bottom_03.png" alt="">
            	<p>个人中心</p>
            </a>
        </div>
    </section>
</section>


<script src="//cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.json-2.4.min.js"></script>
<script src="js/config.js"></script>
<script src="js/public.js"></script>
<script src="js/select.js"></script>
<script src="js/loading.js"></script>
<script type="text/javascript" src="js/alert.js"></script>
<script>
    $(function () {
    	$(".footer_term_list_sum img").attr("src", "images/bottom_02.png");   //底部图标选中效果
    	
    	//跳转到index要带上channel
    	$(".footer_term_list_multiple a").click(function(){
    		var channel = localStorage.getItem("channel");
    		var num = localStorage.getItem("num");
    		window.location.href = "index.html?channel=" + channel + "&num=" + num;
    	});
    	
        var minLimit = GetUrlParameter("minLimit"), maxLimit = GetUrlParameter("maxLimit");
        product_list(minLimit, maxLimit);
        sortList("Comprehensive_Type,Credit_Type");

        if (minLimit || maxLimit) {
            $(".sum_sort li").each(function() {
                var maxSum = $(this).attr("maxLimit"), minSum = $(this).attr("minLimit");
                if (maxSum == maxLimit && minSum == minLimit) {
                    $(".term_list_sum p").text($(this).text());
                    $(".term_list_sum").addClass("active");
                    $(".term_list_sum img").attr("src", "images/list_06.png");
                    $(this).siblings().removeClass("sort_active");
                    $(this).addClass("sort_active")
                }
            });
        }


        $(".sort_model").on("click", "li", function () {
            $(this).siblings().removeClass("sort_active");
            $(this).addClass("sort_active");
            $(this).parents(".sort_model").removeClass('grade_w_roll');
            var termText = $(this).text();
            var termVal = $(this).parents(".sort_model").attr("value");
            if (termVal == "1") {
                $(".term_list_multiple p").text(termText);
            } else if (termVal == "2") {
                $(".term_list_sum p").text(termText);
            } else {
                $(".term_list_type p").text(termText);
            }

        });
        $(".multiple_sort").on("click", "li", function () {
            var multiple_active = $(this).attr("valcode");
            var minLimit = $(".sum_sort .sort_active").attr("minLimit"), maxLimit = $(".sum_sort .sort_active").attr("maxLimit");
            var type_active = $(".type_sort .sort_active").attr("valcode");
            product_list(minLimit, maxLimit, multiple_active, type_active);
        });
        $(".sum_sort li").click(function () {
            var minLimit = $(this).attr("minLimit"), maxLimit = $(this).attr("maxLimit");
            var multiple_active = $(".multiple_sort .sort_active").attr("valcode");
            var type_active = $(".type_sort .sort_active").attr("valcode");
            product_list(minLimit, maxLimit, multiple_active, type_active);
        });
        $(".type_sort").on("click", "li", function () {
            var type_active = $(this).attr("valcode");
            var minLimit = $(".sum_sort .sort_active").attr("minLimit"), maxLimit = $(".sum_sort .sort_active").attr("maxLimit");
            var multiple_active = $(".multiple_sort .sort_active").attr("valcode");
            product_list(minLimit, maxLimit, multiple_active, type_active);
        });

    })
</script>
</body>
</html>